from django.conf.urls import url, include

from users import views


urlpatterns = [

    # 首页
    url(r'^$', views.IndexView.as_view(), name="index"),
    # 用户注册
    url(r'^register/$', views.RegisterView.as_view(), name='register'),
    # 用户登陆
    url(r'^login/$', views.LoginView.as_view(), name='login'),
    # 退出登陆
    url(r'^logout/$', views.LogoutView.as_view(), name='logout'),
    # 忘记密码
    url(r'^forget/$', views.ForgetPwdView.as_view(), name='forget_pwd'),
    # 修改密码
    url(r'^reset/(?P<active_code>.*)/$', views.ResetView.as_view(), name='reset_pwd'),
    # 获取当前登录用户信息
    url(r'^image/upload/$', views.UploadImageView.as_view(), name='image_upload'),

    url(r'^info/$', views.UserInfoView.as_view(), name='user_info'),

    url(r'^users/info/$', views.UserCreateView.as_view(), name='user_create_info'),

    # 修改用户信息

    # 我的课程
    url(r'^mycourse/$', views.MyCourseView.as_view(), name='mycourse'),
    # 我的收藏
    url(r'^myfav/org/$', views.MyFavOrgView.as_view(), name='myfav_org'),
    # 授课教师
    url(r'^myfav/teacher/$', views.MyFavTeacherView.as_view(), name='myfav_teacher'),
    # 公开课程
    url(r'^myfav/course/$', views.MyFavCourseView.as_view(), name='myfav_course'),
    # 我的消息
    url(r'^mymessage/$', views.MyMessageView.as_view(), name='mymessage'),

]


